#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <unordered_map>
#include <vector>
#include <set>
#include <queue>
#include <cmath>

using namespace std;
using LL = long long;
using PII = pair<int, int>;

const int N = 1e5 + 10;

int n;
int q[N];
double rq[N];
LL sum = 0;

int main(){
#ifdef LOCALFLAG
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif

    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cin >> n;
    for(int i = 1; i <= n; i ++){

        cin >> rq[i];
        q[i] = floor(rq[i]);
        sum += q[i];
    }    

    sum = -sum;
    for(int i = 1; i <= n; i ++){
        if(sum && rq[i] != q[i]){
            sum --;
            cout << q[i] + 1 << '\n';
        }else{
            cout << q[i] << '\n';
        }
    }



    return 0;
}